﻿using System;

namespace BaseSyntax.KeyWords.Modifiers.AccessModifiers
{
	public static class ProtectInternal
	{
		public class C1
		{
			// 当前程序集可以访问
			// 程序集外派生于当前类的派生类也可以访问
			protected internal int A1 = 2;
		}
		
		public class C2:C1
		{
			
		}

		public static void test()
		{
			C1 c1 = new C1();
			Console.WriteLine($"{c1.A1}");
			//c2可以访问c1的A1
			C2 c2 = new C2();
			Console.WriteLine($"{c2.A1}");
			
		}
	}
}